clear
[data, data_format] = readfeaturefile('../hw5/hw5-data/oakland_part3_am_rf.node_features');
[test_data, test_data_format] = readfeaturefile('../hw5/hw5-data/oakland_part3_an_rf.node_features');

sigma = max(var(data(:, 6:end)));
numNoiseFeatures = 15;
% [ noise_data ] = addRandomFeatures( data, numNoiseFeatures, sigma );
% [ noise_data ] = addCorruptedFeatures( data, numNoiseFeatures, sigma );

% data = [data; test_data];

classLabels = unique(data(:,5))
classSizes = histc(data(:,5), classLabels )

trainingSize = round(min(classSizes)/2)

% % Possible labels
% VEG = 1004;
% WIRE = 1100;
% POLE = 1103;
% GROUND = 1200;
% FACADE = 1400;

functionNames = {'exponentiated'; 'bayesian'; 'gaussian'};

iterations = 1;

kernel_handle = @kernel_function;

plotFlag = 0;

[ avgTimes, avgConfusionMatrix  ] = RunAllClassifications(functionNames, iterations, classLabels, trainingSize, data, test_data, kernel_handle, plotFlag );
GraphConfusionMatrices( avgConfusionMatrix, functionNames )